﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


    class Reduce
    {
        static void Main(string[] args)
        {
            string text = "aaaaabbbbbcdddeeeedssaass";
            text.ToLower();
            StringBuilder reduced = new StringBuilder();
            for (int i = 0; i < text.Length-1; i++)
            {
                if (text[i] != text[i + 1])
                {
                    reduced.Append(text[i]);                   
                }               
            }
            Console.Write( reduced = reduced.Append(text[text.Length - 1]));
            Console.WriteLine();
        }
    }

